import { axiosInstance } from "./config";

export const getBannerRequest = 
    () => axiosInstance.get('/banner')
// rank 模块  
export const getRankListRequest =
    () => axiosInstance.get('/toplist/detail')

export const getRecommendListRequest = 
    () => axiosInstance.get('/personalized')

// 热搜
export const getHotKeywordsRequest = 
    () => axiosInstance.get('/search/hot')

export const getSuggestListRequest = 
    query => axiosInstance.get(`/search/suggest?keywords=${query}`)

export const getResultSongsListRequest =
    query => axiosInstance.get(`/search?keywords=${query}`)

export const getSongDetailRequest = id => {
    return axiosInstance.get(`/song/detail?ids=${id}`);
      };
export const getHotSingerListRequest = count => {
    return axiosInstance.get(`/top/artists?offset=${count}`);
};   

export const getSingerListRequest = (category, alpha, count) => {
    return axiosInstance.get(
      `/artist/list?cat=${category}&initial=${alpha.toLowerCase()}&offset=${count}`
    );
};
export const getLyricRequest = id => {
    return axiosInstance.get(`/lyric?id=${id}`);
      };
      
export const loginByPhoneRequest = (phone, password) => {
    return axiosInstance.get(
          `/login/cellphone?phone=${phone}&password=${password}`
    );
};
      
export const sentVcodeRequest = phone => {
        return axiosInstance.get(`/captcha/sent?phone=${phone}`);
};
      
export const loginByVcodeRequest = (phone, vcode) => {
        return axiosInstance.get(`/captcha/verify?phone=${phone}&captcha=${vcode}`);
};
export const getSingerInfoRequest = id => {
    return axiosInstance.get(`/artists?id=${id}`);
  };